import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store'
import reset from './assets/css/reset.css'
import animate from './assets/css/animate.css'
import { CountDown } from 'vant';
import { Checkbox, CheckboxGroup } from 'vant';
import { Dialog } from 'vant';

// 全局注册
Vue.use(Dialog);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);

// 全局注册
import Vant from 'vant';
import 'vant/lib/index.css';
import { Icon } from 'vant';
Vue.use(Vant);
Vue.use(CountDown);
import {base_url} from './utils/baseURL'
Vue.prototype.base_url = base_url;

if(sessionStorage.userinfo){
  console.log(sessionStorage.userinfo)
  store.commit('huang/userObjMut',JSON.parse(sessionStorage.userinfo));
}

Vue.mixin({
  methods:{
    handleBackPage(){
      router.push(this.pathFromSta)
    }
  },
  computed:{
      pathFromSta(){
          return this.$store.state.huang.pathFromSta
      }  
  }
})

Vue.config.productionTip = false

new Vue({
  store,
  router,
  render: h => h(App),
}).$mount('#app')
